<?php
class xl_home{
	function read_list(){
		global $dbh;
		$sql='SELECT * FROM home';
		$sth=$dbh->prepare($sql);
		$sth->execute();
		return $sth->fetchAll()[0];
	}
    function insert($data){
        global $dbh;
        $sql="UPDATE home SET title=:title, keyword=:keyword, description=:description, category_question=:category_question, category_introduction=:category_introduction,day_time=:day_time";
        unset($data['image']);
        unset($data['banner']);
        $sth=$dbh->prepare($sql);
        $sth->execute($data);
        return $sth;
    }
}